package com.taldh.springboot.lifecycle;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * date 2020/7/31
 *
 * @author 袁小黑
 * @version 1.0.0
 **/
@SpringBootApplication(scanBasePackageClasses = MySmartLifecycle.class)
public class SpringApplicationTest {
    public static void main(String[] args) {
        SpringApplication springApplication = new SpringApplication();
        ConfigurableApplicationContext run = springApplication.run(SpringApplicationTest.class);
        //run.getBeanFactory().registerSingleton("mySmartLifecycle", MySmartLifecycle.class);
        //MySmartLifecycle bean = run.getBean(MySmartLifecycle.class);
        //run.close();
    }
}
